import React, {Component} from 'react';
import styles from './index.module.css'

class HeadPicker extends Component {
    render() {
        const {list, onClicked, className, isFacilities} = this.props;
    /*    console.log(isFacilities);*/
        return (
            <div className={styles.root}>
                {list.map((item,index) => {
                    return <div onClick={() => onClicked(item)}
                                className={[styles.item, isFacilities.indexOf(item) !== -1 ? className : ''].join(' ')}
                    key={index}>{item}</div>
                })}
            </div>
        );
    }
}

export default HeadPicker;
